Add Jupyter support to brev open command#246
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Add Jupyter support to brev open command#246devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Add EditorJupyter constant and update validation logic - Update help text and examples to include jupyter option - Implement openJupyter function with port forwarding on 8888 - Add browser opening functionality using pkg/browser - Extend OpenStore interface to include MakeWorkspaceWithMetaStore - Follow existing patterns from notebook command for Jupyter integration Co-Authored-By: Alec Fong <alecsanf@usc.edu>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Jupyter support to brev open command
Summary
This PR extends the
brev opencommand to support Jupyter notebooks by addingbrev open <instance-id> jupyter. The implementation:EditorJupyterconstant and updates all validation logic to include "jupyter" as a valid editor typeopenJupyter()function that starts port forwarding on port 8888 and opens browser to localhost:8888OpenStoreinterface to includeutil.MakeWorkspaceWithMetaStorefor port forwarding compatibilitybrev notebookcommand for Jupyter integrationThe implementation reuses existing port forwarding infrastructure and browser opening utilities, maintaining consistency with the current codebase architecture.
Review & Testing Checklist for Human
brev open <instance-id> jupyteractually works with a real Brev workspaceRecommended Test Plan:
brev open <workspace> jupyterbrev open <workspace> codeDiagram
%%{ init : { "theme" : "default" }}%% graph TD OpenCmd["pkg/cmd/open/open.go<br/>Main open command logic"]:::major-edit PortForward["pkg/cmd/portforward/portforward.go<br/>Port forwarding utilities"]:::context Browser["github.com/pkg/browser<br/>Browser opening library"]:::context UtilStore["pkg/cmd/util/util.go<br/>MakeWorkspaceWithMetaStore interface"]:::context OpenCmd -->|"Uses RunPortforward()"| PortForward OpenCmd -->|"Uses OpenURL()"| Browser OpenCmd -->|"Extends interface with"| UtilStore subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
openJupyter()function blocks indefinitely withselect {}following the pattern from the notebook commandportforward.PortforwardStorerequirementsLink to Devin run: https://app.devin.ai/sessions/fd9c4f3f8e0648e0ade8845094dbb8ef
Requested by: @theFong